<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>丙寅命理</title>
<style>
body{font-family:"Microsoft YaHei",sans-serif;background:#fdf6e3;padding:20px;margin:0}
.box{max-width:500px;margin:0 auto;background:#fff;padding:25px;border-radius:15px;box-shadow:0 2px 10px rgba(0,0,0,0.1)}
input{width:100%;padding:12px;margin:8px 0;border:1px solid #ccc;border-radius:8px;font-size:16px;box-sizing:border-box}
button{width:100%;background:#d33682;color:#fff;border:none;padding:14px;font-size:18px;border-radius:10px;margin:20px 0;cursor:pointer}
.result{background:#f9f9f9;padding:15px;border-radius:10px;white-space:pre-wrap;margin-top:20px;font-size:16px}
.note{text-align:center;margin-top:25px;color:#cb4b16;font-weight:bold}
</style>
</head>
<body>
<div class="box">
<h2 style="text-align:center;color:#d33682">✨ 丙寅命理 · 免费排盘</h2>
<input id="year" placeholder="年干（例：丙）">
<input id="month" placeholder="月支（例：辰）">
<input id="day" placeholder="日支（例：巳）">
<input id="hour" placeholder="时支（例：亥）">
<button onclick="go()">立即分析</button>
<div id="out" class="result" style="display:none;"></div>
<div class="note">🔔 详细分析请私信【丙寅】老师</div>
</div>
<script>
function go(){
let y=document.getElementById('year').value.trim();
let m=document.getElementById('month').value.trim();
let d=document.getElementById('day').value.trim();
let h=document.getElementById('hour').value.trim();
if(!y||!m||!d||!h){alert('请填满四柱');return;}
const G={"甲":"木","乙":"木","丙":"火","丁":"火","戊":"土","己":"土","庚":"金","辛":"金","壬":"水","癸":"水"};
const Z={"寅":"木","卯":"木","巳":"火","午":"火","辰":"土","戌":"土","丑":"土","未":"土","申":"金","酉":"金","亥":"水","子":"水"};
const Q={"木":"怒","火":"喜","土":"思","金":"悲","水":"恐"};
const J={"木":"春","火":"夏","土":"长夏","金":"秋","水":"冬"};
let r=`【丙寅命理】\n年干：${y} → ${Q[G[y]]||'？'}\n月支：${m} → ${J[Z[m]]||'？'}\n日支：${d} → ${Z[d]||'？'}\n时支：${h} → ${Z[h]||'？'}\n\n📌 此为免费版，详细分析请私信丙寅老师！`;
document.getElementById('out').innerText=r;
document.getElementById('out').style.display='block';
}
</script>
</body>
</html>